using System.Collections.Generic;
using NodeCanvas.DialogueTrees;
using UnityEngine;

public class ChoiceButton : MonoBehaviour
{
	public delegate void OnClickDelegate(KeyValuePair<Statement, int> pair);

	public UILabel text;

	private KeyValuePair<Statement, int> pair;

	private OnClickDelegate onClick;

	public void Init(KeyValuePair<Statement, int> pair, OnClickDelegate onClick)
	{
		this.onClick = onClick;
		this.pair = pair;
		Statement key = pair.Key;
		text.text = key.text;
	}

	public void OnClick()
	{
		Debug.Log("CLicked");
		if (onClick != null)
		{
			onClick(pair);
		}
	}
}
